/*********************\
* Author:Dzlua
* QQ:505544956
* Time:2017/04/11
\**********************/
#ifndef __LUA_LABEL_H__
#define __LUA_LABEL_H__
#pragma once

#include "../../Core/LuaControl.h"

namespace DuiLib {

class LuaLabel : public LuaControl
{
    SDLUA_CLASS_DECLARE(LuaLabel);

    void SetTextStyle(UINT uStyle);
    UINT GetTextStyle();
    void SetTextColor(DWORD dwTextColor);
    DWORD GetTextColor();
    void SetDisabledTextColor(DWORD dwTextColor);
    DWORD GetDisabledTextColor();
    void SetFont(int index);
    int GetFont();
    int GetTextPadding(LuaState *L);
    int SetTextPadding(LuaState *L);
    bool IsShowHtml();
    void SetShowHtml(bool bShowHtml);

    int EstimateSize(LuaState *L);
    //void DoEvent(TEventUI& event);
    //void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);

    //void PaintText(HDC hDC);

    bool GetAutoCalcWidth();
    void SetAutoCalcWidth(bool bAutoCalcWidth);
    int SetText(LuaState *L);
};

}

#endif //__LUA_LABEL_H__